class Solution {
public:
   vector<int> twoSum(vector<int>& nums, int target) {
    unordered_map<int, int> a;
    for (int i = 0; i < nums.Size(); ++i)
    {
        if (a.find(target - nums[i]) != a.end())
            return { a[target - nums[i]],i };
        else
            a[nums[i]] = i;
    }
    return {};
}
};